<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css瀑布流布局</title>
    <style>
      .container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: masonry; /* 使用masonry布局 ,存在兼容性问题 ,目前火狐浏览器设置首选项可用*/
        grid-gap: 10px;
      }
      img {
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div>
        <img src="./scrollContainer/static/im0.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im1.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im2.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im3.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im4.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im0.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im1.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im2.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im3.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im4.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im0.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im1.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im2.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im3.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im4.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im0.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im1.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im2.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im3.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im4.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im0.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im1.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im2.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im3.png" alt="" />
      </div>
      <div>
        <img src="./scrollContainer/static/im4.png" alt="" />
      </div>
    </div>
  </body>
</html>
